Repository navigation
fix(settings)!: offer the knowledge settings only where the knowledge service is mounted - #36975
Conversation
… service is mounted The knowledge settings page, the ai namespace's embedder section, their two test actions and the Setup entry move out of the default settings slate. service-knowledge contributes all of them from KnowledgeServicePlugin.init() when a settings service is present, with the settings plugin declared in optionalDependencies so its absence is a composition fact. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
…-objects test import Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
…o the knowledge suite Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
…ler on a default boot Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
…bility and translation corpora Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
…nswer Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
…dge entry Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
…-wuyeiy # Conflicts: # docs/qa/platform-checklist/areas/platform-core.json # packages/cli/test/connect-agent-both-halves-wire.pin.test.ts
…with its embedder section joined The hosted-projection pin (#33891) booted builtinSettingsManifests and expected the embedder keys and the test_embedder button on the served ai page. Since #33933 those come only with the knowledge service, so the pin now registers the ai manifest through withAiEmbedderSection, the page a knowledge-mounting deployment serves, and classifies every key of that page. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbZWBDHDjKnpVLP5aCQ
📓 Docs Drift CheckThis PR changes 3 package(s): 23 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 7 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 13 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin f1b56daa855c9b1cfd07e9ad91856dd8b4370058 && git checkout f1b56daa855c9b1cfd07e9ad91856dd8b4370058
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 57445a699810a0545d8b3a7649a77327d47fb18b 502329806381bd19b8afeb5717b9c8df3a3fa918 && git checkout -B drift-repro 57445a699810a0545d8b3a7649a77327d47fb18b && git merge --no-ff 502329806381bd19b8afeb5717b9c8df3a3fa918
node scripts/docs-audit/affected-docs.mjs --json 57445a699810a0545d8b3a7649a77327d47fb18b
|
|
repo:cloud#1 · os-warren · session_01JQwxbZWBDHDjKnpVLP5aCQ Contract-review-claim: session_01JQwxbZWBDHDjKnpVLP5aCQ · head 8ac823a · 2026-11-24T12:56Z The review runs in an isolated sub-agent at |
…age only, judged by identity The contribution recognised the bundled `ai` page by its key set, so a host `ai` manifest with the bundled keys and its own scope, permission, default or option table was replaced by the bundled declaration. It now recognises the bundled page as that very declaration (or the hub's served copy of it, whose sourced specifiers differ only in `options`), and leaves a host page as the host wrote it. New tests pin both branches and the no-settings case. The changeset's "What to do" now says how to remove the stored embedder and knowledge credentials a default deployment no longer serves, and names the host `actionHandlers.knowledge` case. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbZWBDHDjKnpVLP5aCQ
|
repo:cloud#1 · os-warren · session_01JQwxbZWBDHDjKnpVLP5aCQ Contract reviewServed-tier: Read at 2026-11-24T13:02Z. First record on this head. The implementer is the project thread on branch ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentThe narrowing does what the maintainer ruled: it takes away pages that configured a service no stock deployment mounts, and no consumer in this repository or in the hosted runtime loses a working capability. The mechanism follows the branding precedent already in the tree. Sentence by sentence the code agrees with the contract, with one exception (S1). S1 (should-fix) — S2 (should-fix) — the changeset says stored N1 (nit) — the page and its Setup entry are still titled "AI & Embedder" (「AI 与向量化」) in every locale on a deployment that now shows no embedder section. The card names the page by that title and asks only for the section and the description, so this is residue for a follow-up card to decide. N2 (nit) — "knowledge mounted with no settings service offers nothing and does not throw" is read in the code and has no test. N3 (nit) — the bundled N4 (nit) — a host that passes its own Should-fix: S1, S2. Nits: N1–N4. No must-fix. Implemented-by: VERDICT: PASS |
|
repo:cloud#1 · os-warren · session_01JQwxbZWBDHDjKnpVLP5aCQ Contract-review-claim: session_01JQwxbZWBDHDjKnpVLP5aCQ · head c654ad0 · 2026-11-24T13:07Z Delta review of S1 and S2 (record 7132371555) by the same isolated reviewer at |
…s bundled The previous check let a specifier differ in `options` so that a page served through an option source still counted as bundled; that also let a host page that narrowed an option table be replaced. The bundled page is now the registered declaration object and nothing else: a page served through an option source is left alone with the warning (no `ai` key has one today). Pinned with an options-only host case. The changeset names the `value_enc` column for the manual credential cleanup. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbZWBDHDjKnpVLP5aCQ
|
repo:cloud#1 · os-warren · session_01JQwxbZWBDHDjKnpVLP5aCQ Contract reviewServed-tier: Delta review, read at 2026-11-24T13:09Z. It follows the record on ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentS1: closed. The key-set recognition is gone. S2: closed. The changeset now names the three stored credentials, says no door on a default deployment serves or clears them, says S3 (should-fix) — Nits from the earlier record: N2 (no test for "no settings service") and N4 (host N5 (nit) — the changeset's manual removal path (delete rows from Should-fix: S3. Nits: N1, N3, N5. No must-fix. Implemented-by: VERDICT: PASS |
|
repo:cloud#1 · os-warren · session_01JQwxbZWBDHDjKnpVLP5aCQ Contract-review-claim: session_01JQwxbZWBDHDjKnpVLP5aCQ · head 5023298 · 2026-11-24T13:12Z Delta review of S3 (record above) by the same isolated reviewer at |
|
repo:cloud#1 · os-warren · session_01JQwxbZWBDHDjKnpVLP5aCQ Contract reviewServed-tier: Second delta review, read at 2026-11-24T13:13Z. It follows the records on ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentS3: closed. The N5: answered by the changeset's N6 (nit) — on the option-source branch the warning says the registered N1 (the "AI & Embedder" title) and N3 (the lost No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:cloud#1 · os-warren · session_01JQwxbZWBDHDjKnpVLP5aCQ ACCEPT — PR #36975, head
Seat opinion: land it. The narrowing is the card's ruled direction, every contract-review finding of grade should-fix was fixed and closed on this head, and the full dogfood battery is green on this exact head. 席位核对 — ACCEPT · head
|
|
repo:cloud#1 · os-warren · session_01JQwxbZWBDHDjKnpVLP5aCQ 维护者速读
Approval requested — PR #36975 · 2026-11-24T14:30Z The pull declares a narrowing ( |
Requested by Warren · project thread
Fixes #33933
Supersedes #34223: the same change, carried to a branch this session can push, with
origin/mainmerged in (two conflicts resolved, one new pin adjusted; see Verification). Its earlier park on objectstack-ai/cloud#4569 is lifted by reading, not by that card: claim comment 7131785382 on #33933.Clause-②: no (narrowing) — on a deployment that does not mount
KnowledgeServicePlugin(every stock boot),GET/PUT /api/settings/knowledgeandPOST /api/settings/knowledge/testanswer404 UNKNOWN_NAMESPACE; a write of anai.embedder_*key answers400 UNKNOWN_KEY;POST /api/settings/ai/test_embedderanswers400 SETTINGS_ACTION_FAILED(no handler registered); the hub list dropsknowledgeand the Setup sidebar dropsnav_settings_knowledge.Metadata-protocol: none
Skills-docs: none — no skill under
skills/**teaches the knowledge settings page or theai.embedder_*keys;skills/objectstack-aiteaches wiringKnowledgeServicePlugin, which is unchanged.BREAKING for a deployment that does not mount the knowledge service: the Knowledge page, the AI page's Embedder section, their two test buttons and the Setup entry are no longer offered by default. They come back, unchanged, when
KnowledgeServicePluginis mounted besideSettingsServicePlugin. Storedknowledge.*/ai.embedder_*rows are untouched. The changeset carries the ADR-0087 not-required marker (no-migration-prescription).维护者速读
packages/services/service-knowledge/src/knowledge-settings-contribution.ts(注册逻辑,尤其 ai 分区只并入内置 ai 清单那段)、packages/services/service-settings/src/manifests/ai.manifest.ts(Embedder 分区拆出)、packages/services/service-knowledge/src/knowledge-service-plugin.ts(optionalDependencies 保证设置插件先初始化)。pnpm --filter @objectstack/service-knowledge exec vitest run src/__tests__/knowledge-settings-contribution.test.ts,预期 7 个用例全绿(挂载有、不挂载无)。main16b444e。托管的向量化器读不到ai.embedder_*时按「未配置」处理,不建、不报错;托管环境没有挂载知识库,也没有地方用向量化器。所以不再等 cloud#4569。What changes
@objectstack/service-settingsbuiltinSettingsManifestsdropsknowledgeSettingsManifest(10 → 9).aiSettingsManifestdrops its embedder section; the section is exported asaiEmbedderSettingsSpecifiers, withwithAiEmbedderSection(manifest)to join it (idempotent).actionHandlersmap no longer registersknowledge.testorai.test_embedder.knowledgeSettingsManifest,knowledgeTestActionHandler,aiSettingsManifest,aiEmbedderSettingsSpecifiers,withAiEmbedderSection,aiTestEmbedderActionHandler.settings.ai.descriptionno longer names the knowledge base, in all 11 bundled locales.@objectstack/service-knowledgecontributeKnowledgeSettings(ctx, version), called fromKnowledgeServicePlugin.init(). It registers theknowledgemanifest andknowledge.test, and joins the embedder section plusai.test_embedderto theainamespace. It joins them only when the servedaipage is the bundled one, or already declares the embedder keys. A host's ownaimanifest is left untouched, and the plugin logs a warning saying why. It also registers thenav_settings_knowledgeSetup entry as anavigationContributionsbundle through themanifestservice.aipage, recognised as that very declaration object (isBundledAiManifest). A hostaipage that differs in any way (scope, permission, default, option table), or one served through an option source, is left as registered and the plugin logs a warning.optionalDependenciesnamescom.objectstack.service.settings(literal, ADR-0116), so "no settings service" at init is a fact of the composition.@objectstack/service-settings; devDependency@objectstack/platform-objectsfor the merged-Setup-tree test.@objectstack/platform-objects: the staticnav_settings_knowledgeentry leavesSETUP_NAV_CONTRIBUTIONS. Its label stays keyed in the Setup bundles.docs/qa/platform-checklist/areas/platform-core.json:builtin-apps-nav-render(rev 16) andsettings-hub-roundtrip(rev 9) restated for 9 builtins and the knowledge page's new source.Tests
service-settings/src/knowledge-settings-default-absent.pin.test.tspins the default boot (8 cases, refusals by status +error.code):knowledgein the aggregate or the hub list;GET knowledgeanswers 404UNKNOWN_NAMESPACE;aipage;PUT ai {embedder_provider}answers 400UNKNOWN_KEY;POST ai/test_embedderanswers 400SETTINGS_ACTION_FAILED, judged against the hub's own no-handler answer, andPOST knowledge/testanswers 404UNKNOWN_NAMESPACE;service-knowledge/src/__tests__/knowledge-settings-contribution.test.tsuses a LiteKernel withKnowledgeServicePlugindeliberatelyused BEFORESettingsServicePlugin, against a bare control kernel (7 cases):nav_settings_knowledgeappears exactly once with the service and never without it;settings-default-action-handlers.pin.test.ts.service-knowledge/src/__tests__/knowledge-settings-host-ai.test.ts(7 cases, on a realSettingsService): the bundled page is joined; a page served through an option source is not; host pages with the bundled keys and a different scope, read permission, option table or default are left as the host's own object, with one warning; a host page that already declares the embedder keys keeps its declaration and gets the button handler; no settings service ⇒ nothing offered, no throw. Ablation: with the old key-set recognition put back, 3 of the host cases go red (scope, permission, default).cloud-managed-settings.pin.test.ts(landed on main after this PR was first written, 托管环境的「系统设置」隐藏自托管才用得到的基础设施设置(文件存储适配器、AI 提供商与向量化、知识库后端) #33891):boot()registers theaimanifest throughwithAiEmbedderSection, the page a knowledge-mounting deployment serves, and the key-classification case reads that joined page. The hosted projection is still judged over every key it hides, the embedder keys included.packages/cli/test/connect-agent-both-halves-wire.pin.test.ts: main's count (37) less the knowledge entry, 36; the comment's history line extended.ai.manifest.test.ts: the embedder describe reads the exported section; a joined-parse and idempotence case is added.settings-default-action-handlers.pin.test.ts: the population excludes the two moved buttons.settings-visibility-declaration.pin.test.tsandsettings-translation-coverage.test.ts: the corpus keeps the knowledge declarations, so the measured 10 manifests and 90 predicates and the copy coverage still hold.Acceptance notes
KnowledgeServicePlugin. The test kernel above stands in for one, as ruled;examples/app-todois unchanged.main16b444e.packages/service-ai/src/plugin.tsapplyEmbedder(L1785–1813) readssettings.getNamespace('ai'); with noembedder_*key declared,buildEmbedderFromValues(L576–577) reads the provider as'none'and returnsnull, so no embedder is built and nothing throws. Itssettings.registerAction('ai', 'test_embedder', …)(L1818) does not throw either:registerActionrefuses only an unknown namespace (settings-service.tsL1964–1968). No hosted runtime mountsKnowledgeServicePluginor consumesEMBEDDER_SERVICE(onlypackages/knowledge-turso, which nothing mounts). The hosted hide list (cloud-managed-settings.ts, 托管环境的「系统设置」隐藏自托管才用得到的基础设施设置(文件存储适配器、AI 提供商与向量化、知识库后端) #33891) keeps theembedder_*keys andtest_embedder, so a hosted runtime that later mounts the knowledge service still hides them.packages/objectos-runtime/src/env-settings-door-namespace-coverage.test.tsandapps/cloud/test/settings-cross-org-doors.test.tsstill countknowledgein the default registry and go red at the pin move that first includes this PR; no hosted behaviour changes. Carried by objectstack-ai/cloud#4959 (Blocked-by:this PR).@objectstack/embedder-openaiinstall hint left the AI page's description with the section. N6, on the option-source branch the warning says the page "is not the bundled one"; no composition reaches that branch.UNKNOWN_NAMESPACE/UNKNOWN_KEY(the route envelope's spelling of the service'sUnknownNamespaceError/UnknownKeyError).packages/services/service-settings/src/index.ts: the package entry exports the six symbols listed under What changes.packages/services/service-knowledge/vitest.config.ts: src aliases forservice-settings,typesandplatform-objects, ascheck:test-source-aliasrequires.settings-visibility-declaration.pin.test.ts,settings-translation-coverage.test.ts) were outside the listed files too. They are measurement pins over this package's declarations, updated so they keep measuring the same declarations.Verification
All verify runs go through
scripts/pm/os-verify-lock.shand quote the lock'sVERDICT command-exit 0line.On this PR's final head 5023298
Commits on this branch: #34223's head
ba9ec457d9, a merge oforigin/main144d368eac(a0cf1e359b), the hosted-projection pin adjustment (8ac823aa64), the contract review's S1/S2 fixes (c654ad07b7), and its S3 fix (5023298063).docs/qa/platform-checklist/areas/platform-core.json: main's revisions 17–19 ofbuiltin-apps-nav-renderkept; this change re-applied as revision 20 (10 namespaces; 46 Setup destinations, main's 47 less Knowledge).packages/cli/test/connect-agent-both-halves-wire.pin.test.ts: main's 37 less Knowledge = 36;SETUP_NAV_CONTRIBUTIONS29 → 28.5023298063(the PR checks do not run it:ci.yml's dogfood job skipspull_requestevents, so it was run here). Closure built withpnpm --filter '@objectstack/dogfood^...' build(exit 0), thenpnpm --filter @objectstack/dogfood testunder the lock, no shard, no path:VERDICT command-exit 0 · held the lock 2043s; Test Files 487 passed, 3 skipped (490); Tests 4127 passed, 68 skipped (4195). An earlier full run onc654ad07b7read the same counts (VERDICT command-exit 0 · held the lock 2604s).5023298063: 61 success, 9 expected skip, 0 failed (read withscripts/pm/pr-state.mjs --pr 36975).@objectstack/service-settingstest: Test Files 77 passed (77), Tests 1523 passed (1523), on8ac823aa64; the later commits do not touch the package.@objectstack/service-knowledgetest on5023298063: Test Files 6 passed (6), Tests 64 passed (64); typecheck exit 0.@objectstack/service-settingstypecheck: exit 0.@objectstack/clitest/connect-agent-both-halves-wire.pin.test.ts: 2 passed.@objectstack/plugin-auth, the 5 files that readbuiltinSettingsManifests: Tests 133 passed (133).node scripts/check-platform-checklist.mjs --changed-from origin/main: OK, 8 anchors judged, 0 lost.CONTRACT_REVIEW_TIER: PASS on8ac823aa64(comment 7132371555, S1 and S2 should-fix), PASS onc654ad07b7(7132488363, S1 and S2 closed, S3 should-fix), PASS on5023298063(7132537690, S3 closed, nits only).Earlier readings on #34223's own heads, kept for the ablation record:
Package tests and typecheck on the final head f27aef7
@objectstack/service-settingstest: Test Files 76 passed (76), Tests 1484 passed (1484); typecheck exit 0.@objectstack/service-knowledgetest: Test Files 5 passed (5), Tests 56 passed (56); typecheck exit 0.@objectstack/platform-objectstest: Test Files 122 passed (122), Tests 2007 passed (2007).334f6da447:@objectstack/plugin-auth: the 5 files that readbuiltinSettingsManifests, Tests 133 passed (133).@objectstack/spec:settings-manifest.test.ts, Tests 86 passed (86).@objectstack/platform-objectstypecheck: exit 0.Dogfood battery (narrowing): green at 1b210ee
pnpm --filter '@objectstack/dogfood^...' build(exit 0). Thenpnpm --filter @objectstack/dogfood testunder the lock, with no shard and no path: Test Files 467 passed, 3 skipped (470); Tests 3962 passed, 42 skipped (4004); exit 0.origin/main, which brings main's own commits; CI runs the battery on the merge.driver-turso, because a dependency arrived with a merge beforepnpm install. That run is discarded and is not counted.Ablation of every pin (on-disk mutation via scripts/ablation-replace.mjs, WRAP restore, restore proven blob == HEAD and git diff HEAD empty)
Tests are src-aliased, so no dist leg is needed.
builtinSettingsManifests: red, 5 failed.GET knowledge404, both test-button doors.aipage: red, 4 failed (no embedder key/button;PUT embedder_provider400; population; handler reach).nav_settings_knowledgeback: red in the absent pin (stock nav) and in the knowledge suite (the merged tree holds the entry twice when mounted, once when bare).enAI description naming the knowledge base again: red, 1 failed (locale description).actionHandlersregisteringai.test_embedderagain:contributeKnowledgeSettingsnot called: red, 6 of 7 failed (only the bare-hub non-vacuity case stays green).com.objectstack.service.settingsdropped fromoptionalDependencies: red, 6 of 7 failed.useorder alone does not put settings first.ablation-replace: ok restored: blob == HEAD, and_DIFF_HEAD_LINES=0at the end.Gates
node scripts/pm/dispatch-gates.mjs --commandsat1b210ee4f6: 90 families, all exit 0.--ran: 90 derived, 90 run, 0 NOT-MEASURED (a derived zero).f27aef7db8(91 families,check:adr-anchorsadded):check:i18nfirst read exit 1 on aplatform-objectsdist built before the merge. Afterpnpm --filter '@objectstack/platform-objects...' buildit read exit 0 ("all bundles in sync"). The other families were read as recorded in the report.node scripts/check-platform-checklist.mjs --changed-from origin/main: OK, 9 anchors judged, 0 lost.node scripts/check-nul-bytes.mjs: OK. eslint--no-inline-configon the changed.tsfiles: exit 0.git merge-tree --write-tree origin/main HEAD: exit 0.🤖 Generated with Claude Code
https://claude.ai/code/session_01JQwxbZWBDHDjKnpVLP5aCQ